﻿using System.Windows;
using System.Windows.Media;
using System.Windows.Shapes;
namespace Eniux.Windows.Controls.Core.Core
{
   public class AttachBase:BaseCtrl
    {
       
       public static DynamicResourceExtension ext = new DynamicResourceExtension();


       #region 附加属性StrokeDashArray
       public static readonly DependencyProperty StrokeDashArrayProperty = DependencyProperty.RegisterAttached("StrokeDashArray", typeof(DoubleCollection), typeof(AttachBase), null);
       public static void SetStrokeDashArray(DependencyObject element, DoubleCollection value)
       {
           element.SetValue(StrokeDashArrayProperty, value);
       }
       public static DoubleCollection GetStrokeDashArray(DependencyObject element)
       {
           return (DoubleCollection)element.GetValue(StrokeDashArrayProperty);
       }
       #endregion

        #region 附加属性CornerRadius
        public static readonly DependencyProperty CornerRadiusProperty = DependencyProperty.RegisterAttached("CornerRadius", typeof(CornerRadius), typeof(AttachBase), null);
        public static void SetCornerRadius(DependencyObject element, CornerRadius value)
        {
            element.SetValue(CornerRadiusProperty, value);
        }
        public static CornerRadius GetCornerRadius(DependencyObject element)
        {
            return (CornerRadius)element.GetValue(CornerRadiusProperty);
        }
        #endregion

        #region 附加属性ImageSource 
        public static readonly DependencyProperty ImageSourceProperty = DependencyProperty.RegisterAttached("ImageSource", typeof(ImageSource), typeof(AttachBase), null);
        public static void SetImageSource(DependencyObject element, ImageSource value)
        {
            element.SetValue(ImageSourceProperty, value);
        }
        public static ImageSource GetImageSource(DependencyObject element)
        {
            return (ImageSource)element.GetValue(ImageSourceProperty);
        } 
        #endregion
   
        #region 附加属性IsMouseOverBackgroundKey
        public static readonly DependencyProperty IsMouseOverBackgroundKeyProperty = DependencyProperty.RegisterAttached("IsMouseOverBackgroundKey", typeof(Brush), typeof(AttachBase), new PropertyMetadata(null, IsMouseOverBackgroundKeyPropertyChanged));
        private static void IsMouseOverBackgroundKeyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
        }
        public static void SetIsMouseOverBackgroundKey(DependencyObject element, Brush value)
        {
            element.SetValue(IsMouseOverBackgroundKeyProperty, value);
        }
        public static Brush GetIsMouseOverBackgroundKey(DependencyObject element)
        {
            return (Brush)element.GetValue(IsMouseOverBackgroundKeyProperty);
        }
        #endregion

        #region 附加属性IsPressedBackgroundKey
        public static readonly DependencyProperty IsPressedBackgroundKeyProperty = DependencyProperty.RegisterAttached("IsPressedBackgroundKey", typeof(Brush), typeof(AttachBase), new PropertyMetadata(null, IsPressedBackgroundKeyPropertyChanged));
        private static void IsPressedBackgroundKeyPropertyChanged(DependencyObject d, DependencyPropertyChangedEventArgs e)
        {
        }
        public static void SetIsPressedBackgroundKey(DependencyObject element, Brush value)
        {
            element.SetValue(IsPressedBackgroundKeyProperty, value);
        }
        public static Brush GetIsPressedBackgroundKey(DependencyObject element)
        {
            return (Brush)element.GetValue(IsPressedBackgroundKeyProperty);
        }
        #endregion
    }
}
